
/**
 * 业务逻辑复用代码
 */
import { ref, onMounted } from 'vue'
import { findBanner } from '@/api/home'
export const useBanner = () => {
  const sliders = ref([])
  const getBanner = async () => {
    const res = await findBanner()
    // console.log(res)
    sliders.value = res.result
  }
  onMounted(() => {
    getBanner()
  })
  return { sliders }
}
